
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Beans;

import VOs.City;
import VOs.Country;
import VOs.Location;
import VOs.Reserve;
import java.util.Date;
import javax.ejb.Remote;
import VOs.Enterprise;
import VOs.Plan;
import VOs.Users;
import java.util.List;

/**
 *
 * @author Julian
 */
@Remote
public interface LogicaRemote {

    public boolean checklogin(String username, String pass) throws Exception;

    public boolean checkAdminLogin(String username, String pass);

    public boolean createUsers(String username, String name, String lastname, String phone, String pass, String creditcard, String email,String identification) throws Exception;

    public boolean editUsers(String username, String name, String lastname, String phone, String pass, String creditcard, String email) throws Exception;

    public List<City> findbyCountry(String Country) throws Exception;

    List<Country> findallCountries() throws Exception;

    public boolean createReserve(int idplan, int idslocation, Date inicio, Date fin, String idext) throws Exception;

    public boolean editReserve(int idplan, int idslocation, Date inicio, Date fin, String idext) throws Exception;

    public List<Reserve> findByPlan(int id) throws Exception;

    public boolean createLocation(String Address, int City, String Enterprise) throws Exception;

    public boolean editLocation(int ID, String Address, int City) throws Exception;

    public List<Location> getLocation(String Enterprise) throws Exception;

    public int TotalByPlan(int id) throws Exception;

    boolean editEnterprise(String idEnterprise, String newUrl, String newPhone, String newIdType);
    
    Enterprise getEnterpriseById(String referenceId) throws Exception;

    List<Enterprise> getEnterpriseByType(String referenceIdType, int codePage, int pageLength) throws Exception;

    boolean createPlan(String userName);

    List<Plan> getPlanByUsername(String userName, int pageCode, int pageLength);

    public boolean cancelReserve(int idreserva) throws Exception;

    public List<Location> getLocationCity(int idCity) throws Exception;

    public List<Location> getLocationByTipeEnterprise(String idTipe) throws Exception;

    public List<City> findallCity() throws Exception ;

    List<Plan> getPlansWithActiveReservesByUsername(String userName) throws Exception;

    public Users User(String username) throws Exception;


    public Plan createPlan2(String userName);


    public List<Plan> getall(String user) throws Exception ;

    
}
